<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var arrs = ['a','b','c','d','a','c','d','b'];
        //{'a':2,'b':2,'c':2,'d':2}

        var test = {'a':2,'b':2,'c':2,'d':2}

        // if(!('a' in test)){
        //     test['a'] = 1
        // }
        // else{
        //     test['a']++;
        // }

        // if(test['a']){
        //     test['a']++
        // }
        // else{
        //     test['a'] = 1;
        // }

        // alert(test['z'])




        var obj = {
            name:'张三',
            age:18
        }

        alert(obj['name']);
        alert(obj['height']);














    </script>
</body>
</html>